<template>
	<view class="uni-list">
		<checkbox-group @change="change">
			<view class="uni-list-cell uni-list-cell-pd" v-for="item,index in traveler" :key="index">
				<!-- <label class="info-left"> -->
					<view>
						<checkbox :value="item._id" :checked="item.selected" />
					</view>
					<view>
						<view>
							姓名：{{item.name}}
						</view>
						<view>
							证件号：{{item.certificateNum | cartFilter}}
						</view>
					</view>
				<!-- </label> -->
				<view>
					<button type="default" size="mini" @click="onClick(item)">编辑</button>
				</view>
			</view>
		</checkbox-group>
	</view>
</template>

<script>
	export default{
		props: {
			traveler: {
				type: Array,
				default: ()=>{
					return []
				}
			},
		},
		data() {
			return {}
		},
		filters: {
			cartFilter: function(value) {
				return value;
			}
		},
		methods:{
			onClick(info){
				this.$emit('click',info)
			},
			change(e){
				this.$emit('changes',e)
			}
		}
	}
</script>

<style>
	.info-left{
		background-color: #2C405A;
	}
</style>
